//hook的方式只能用于toolkit 只能用于函数组件
import { Routes } from "react-router-dom"
import "./App.css"

//引入路由数组文件
import routersArray from "./router/routersArray"
import createRoute from "./router/createroute"
function App() {
  console.log(createRoute(routersArray))
  return <>
    <div className="App"> 
    路由的控制 --
    <Routes>
      {
        createRoute(routersArray)
      }
    </Routes>
    
    </div>
  </>
}

export default App